<template>
  <myDialog :isDialog="isShowFilePreview" title="文件预览" :fullscreen="true" @handleClose="$emit('handleClose')">
    <template slot="content">
      <filePreviewCmp :fileData="fileData"></filePreviewCmp>
      <div class="formBtnBox">
        <div class="saveBtn" style="border-radius: 20px;" @click="$emit('handleClose')">关闭预览</div>
      </div>
    </template>
  </myDialog>
</template>

<script>
import filePreviewCmp from './components/filePreviewCmp.vue'

export default {
  components: {
    filePreviewCmp,
  },
  props: {
    isShowFilePreview: {
      type: Boolean,
      default: false,
    },
    fileData: {
      type: Object,
      default: () => { },
    },
  },
};
</script>

<style lang="scss" scoped>
.layout-file {
  width: 100%;
  height: 100%;
  /* width: 100vw;
  height: 100vh; */
  /* position: absolute;
  top: 0;
  left: 0;
  z-index: 999; */

  /* width: calc(50% - 1rem);
  height: 50%;
  float: left;
  margin-top: 0.8rem;
  margin-right: 0.8rem;
  position: relative;
  border: 1px solid #f00;
  border-radius: 0.3rem;
  &:nth-child(1),
  &:nth-child(2) {
    margin-top: 0;
  } */
}

.formBtnBox {
  position: absolute;
  bottom: 10%;
  left: 45%;
  z-index: 99;
  cursor: pointer;
}
</style>
